/**
 * 
 */
package kr.co.insoft.publicmesh.controller.rest;

import java.util.List;

import kr.co.insoft.core.model.orchestration.OrchestrationTreeEntityModel;
import kr.co.insoft.core.service.orchestration.OrchestrationTreeService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author IN-SOFT Inc. GoodwillDD(sylee@in-soft.co.kr)
 * 
 */
@RestController
@RequestMapping(value = "rest/orchestration/orchestration", method = RequestMethod.GET, produces = {
		"application/xml", "application/json" })
@ResponseStatus(HttpStatus.OK)
public class RestOrchestrationController {

	@Autowired
	OrchestrationTreeService treeService;

	@RequestMapping(value = "getTree")
	public OrchestrationTreeEntityModel getTree() throws Exception {
		return treeService.getTree();
	}

	@RequestMapping(value = "getTreeNonRoot")
	public List<OrchestrationTreeEntityModel> getTreeNonRoot() throws Exception {
		return treeService.getTreeNonRoot();
	}
	
	@RequestMapping(value = "getEventChainTreeNonRoot")
	public List<OrchestrationTreeEntityModel> getEventChainTreeNonRoot() throws Exception {
		return treeService.getEventChainTreeNonRoot();
	}
}
